*** Replication do-file for Baekgaard, Halling, and Moynihan (2024): "Burden Tolerance: Developing a Validated Measurement Instrument across Seven Countries", Public Administration Review ***

*Graphical settings
set scheme plotplain, perm
graph set window fontface "Arial Narrow"

*Set a working directiory for storage of graphs and tables. Data files should also be placed in this folder. 
cd ""

* EXPLORATORY FACTOR ANALYSIS *

*Call Round 1 Data
use "Round 1.dta", replace

*Recode variables, so higher values equals higher burden tolerance
recode q4* (6=.) (1=5) (2=4) (4=2) (5=1)

*Label variables
label define agree_new 1 "Strongly disagree" 2 "Disagree" 3 "Neither agree or disagree" 4 "Agree" 5 "Strongly Agree" 
label values q4* agree_new 

*Descriptive Statistiscs ( reported in Table 3)
tabstat q4*, by(country) statistics (mean sd) col(stat) format(%3.2f) noseparator
tabstat q4*,  statistics (mean sd) col(stat) format(%3.2f) noseparator

*Remove variables with highly skewed distributions (as explained in text) 
drop  q4_7 q4_9  

*Exploratory factor analysis (reported in TABLE 4)
factor q4*, pf 

*Remove items that do not load on dimension 1
drop  q4_3 q4_11 q4_13 q4_15

*Exploratory factor analyis with remaining items pooled and per country (reported in TABLE 5)
factor q4*, pf
factor q4* if country==1, pf 
factor q4* if country==2, pf 
factor q4* if country==3, pf 
factor q4* if country==4, pf 
factor q4* if country==5, pf 
factor q4* if country==6, pf 
factor q4* if country==7, pf 

*Remove items with loadings below .3
drop q4_5 q4_14 q4_12

*Reliability Analysis (reported in TABLE 6)
alpha q4* , item casewise
alpha q4* if country==1, item casewise
alpha q4* if country==2, item casewise
alpha q4* if country==3, item casewise
alpha q4* if country==4, item casewise
alpha q4* if country==5, item casewise
alpha q4* if country==6, item casewise
alpha q4* if country==7, item casewise

* CONFIRMATORY FACTOR ANALYSIS *

*Call Round 2 Data
use "Round 2.dta", replace

*Recode variables, so higher values equals higher burden tolerance
recode q4* (6=.) (1=5) (2=4) (4=2) (5=1)

*Label variables
label define agree_new 1 "Strongly disagree" 2 "Disagree" 3 "Neither agree or disagree" 4 "Agree" 5 "Strongly Agree" 
label values q4* agree_new 

*Descriptive Statistiscs ( reported in Table 3)
tabstat q4*, by(country) statistics (mean sd) col(stat) format(%3.2f) noseparator
tabstat q4*,  statistics (mean sd) col(stat) format(%3.2f) noseparator

*CFA - Pooled (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) , standardized 
predict tolerance_6_all, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) , standardized 
predict tolerance_5a_all, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) , standardized 
predict tolerance_5b_all, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6), standardized 
predict tolerance_4_all, latent(Tol_4)
estat gof, stats(all)

*CFA - Brazil (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==1, standardized 
predict tolerance_6_bra, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==1, standardized 
predict tolerance_5a_bra, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==1, standardized 
predict tolerance_5b_bra, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==1, standardized 
predict tolerance_4_bra, latent(Tol_4)
estat gof, stats(all)

* CFA - Canada (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==2, standardized 
predict tolerance_6_can, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==2, standardized 
predict tolerance_5a_can, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==2, standardized 
predict tolerance_5b_can, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==2, standardized 
predict tolerance_4_can, latent(Tol_4)
estat gof, stats(all)

* CFA - France (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==3, standardized 
predict tolerance_6_fra, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==3, standardized 
predict tolerance_5a_fra, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==3, standardized 
predict tolerance_5b_fra, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==3, standardized 
predict tolerance_4_fra, latent(Tol_4)
estat gof, stats(all)

* CFA - Serbia (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==4, standardized 
predict tolerance_6_ser, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==4, standardized 
predict tolerance_5a_ser, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==4, standardized 
predict tolerance_5b_ser, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==4, standardized 
predict tolerance_4_ser, latent(Tol_4)
estat gof, stats(all)

* CFA - Sweden (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==5, standardized 
predict tolerance_6_swe, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==5, standardized 
predict tolerance_5a_swe, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==5, standardized 
predict tolerance_5b_swe, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==5, standardized 
predict tolerance_4_swe, latent(Tol_4)
estat gof, stats(all)

* CFA - Germany
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==6, standardized 
predict tolerance_6_ger, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==6, standardized 
predict tolerance_5a_ger, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==6, standardized 
predict tolerance_5b_ger, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==6, standardized 
predict tolerance_4_ger, latent(Tol_4)
estat gof, stats(all)

* CFA - Hungary (reported in TABLE 7)
sem (Tol_6 -> q4_1) (Tol_6 -> q4_2) (Tol_6 -> q4_4) (Tol_6 -> q4_6) (Tol_6 -> q4_8 ) (Tol_6 -> q4_10 ) if country==7, standardized 
predict tolerance_6_hun, latent(Tol_6)
estat gof, stats(all)

sem (Tol_5a -> q4_1) (Tol_5a -> q4_2) (Tol_5a -> q4_4) (Tol_5a -> q4_6) (Tol_5a -> q4_10 ) if country==7, standardized 
predict tolerance_5a_hun, latent(Tol_5a)
estat gof, stats(all)

sem (Tol_5b -> q4_1) (Tol_5b -> q4_2) (Tol_5b -> q4_4) (Tol_5b -> q4_6) (Tol_5b -> q4_8) if country==7, standardized 
predict tolerance_5b_hun, latent(Tol_5b)
estat gof, stats(all)

sem (Tol_4 -> q4_1) (Tol_4 -> q4_2) (Tol_4 -> q4_4) (Tol_4 -> q4_6) if country==7, standardized 
predict tolerance_4_hun, latent(Tol_4)
estat gof, stats(all)

* Reliability - 6 items (reported in TABLE 7)
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 , item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==1, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==2, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==3, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==4, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==5, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==6, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 q4_10 if country==7, item casewise

* Reliability - without q4_10 (reported in TABLE 7)
alpha q4_1 q4_2 q4_4 q4_6 q4_8 , item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==1, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==2, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==3, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==4, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==5, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==6, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_8 if country==7, item casewise

* Reliability - without q4_8 (reported in TABLE 7)
alpha q4_1 q4_2 q4_4 q4_6 q4_10 , item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==1, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==2, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==3, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==4, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==5, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==6, item casewise
alpha q4_1 q4_2 q4_4 q4_6 q4_10 if country==7, item casewise

* Reliability - 4 items (reported in TABLE 7)
alpha q4_1 q4_2 q4_4 q4_6 , item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==1, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==2, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==3, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==4, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==5, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==6, item casewise
alpha q4_1 q4_2 q4_4 q4_6  if country==7, item casewise

* DESCRIPTIVES, CORRELATIONS, AND REGRESSIONS *

*Call combined data for Round 1 and Round 2
use "Combined.dta", replace

*Recode variables, so higher values equals higher burden tolerance
recode q4* (6=.) (1=5) (2=4) (4=2) (5=1)

*Label variables
label define agree_new 1 "Strongly disagree" 2 "Disagree" 3 "Neither agree or disagree" 4 "Agree" 5 "Strongly Agree" 
label values q4* agree_new 

*Generates Burden tolerance index
gen tolerance_all=((q4_1+q4_2+q4_4+q4_6)-4)/16


*Descriptive Statistics (reported in TABLE 8)
sum tolerance_all if period==1
sum tolerance_all if period==2

sort country
by country: sum tolerance_all if period==1
by country: sum tolerance_all if period==2

*Correlations with other concepts (reported in TABLE 9)
pwcorr tolerance_all tax_psyc benefits_psyc benefits_dummy tax_dummy ideology trust_1 interest satisfaction fraud_index efficacy_index health_1 ethnicity_dummy age gender education_dummy employment, sig star(.05) 

by country: pwcorr tolerance_all benefits_dummy tax_dummy  tax_psyc benefits_psyc ideology trust interest satisfaction fraud_index efficacy_index health ethnicity_dummy age gender education_dummy employment, sig star(.05) 

*Regression Analysis (reported in TABLE 10)
eststo clear
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.country, robust
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment i.country, robust
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil i.country, robust
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology i.country, robust
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 i.country, robust
esttab using Table10.rtf, p(2) b(2) onecell label nobaselevels mtitle("Model 1" "Model 2" "Model 3" "Model 4" "Model 5") sfmt(0) replace compress star(+ 0.10 * 0.05 ** 0.01) nogaps
eststo clear

*Regressions by Country (reported in FIGURE 2 and TABLE A5)
reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 i.country, robust
estimates store Pooled
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==1, robust
estimates store Brazil
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==2, robust
estimates store Canada
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==3, robust
estimates store France
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==4, robust
estimates store Serbia
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==5, robust
estimates store Sweden
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==6, robust
estimates store Germany
eststo: reg tolerance_all i.gender i.age i.ethnicity_dummy i.education i.employment c.health_1 i.income_quartil c.ideology c.trust_1 if country==7, robust
estimates store Hungary

coefplot Pooled Brazil Canada France Serbia Sweden Germany Hungary, drop(_cons 2.age 3.age 4.age 2.education 1.country 2.country 3.country 4.country 5.country 6.country 7.country) xline(0) coeflabels(1.gender= `"Women (ref: men)"' 5.age=`"Age: 55+ (ref: 18-24)"' 3.education=`"High education (ref: low)"' 1.employment=`"Unemployed (ref: employed)"' 1.ethnicity_dummy=`"Ethnic minority (ref: majority)"' health_1=`"Health"' 1.income_quartil=`"Income above mean (ref: below)"' ideology=`"Conservatism"' trust_1=`"Trust in politicians"') bycoefs ylabel("") legend(size(small) cols(4)) order(1.gender  health_1 3.education 1.employment 5.age trust_1 1.income_quartil 1.ethnicity_dummy ideology)
graph export Figure2.png, replace 

esttab using TableA5.rtf, p(2) b(2) onecell label nobaselevels mtitle("Brazil" "Canada" "France" "Serbia" "Sweden" "Germany" "Hungary") sfmt(0) replace compress star(+ 0.10 * 0.05 ** 0.01) nogaps
eststo clear

* Descriptive Statistics for Demographic and Attitudinal Measures across Surveys (reported in TABLE A1)

// Creates dummies for use in tables
tab age, gen(dum_age)
tab education, gen (educ_dummy)

//Create table
eststo summstats:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if period==1
eststo summstats2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if period==2
eststo brazil:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==1 & period==1
eststo brazil2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==1 & period==2
eststo canada:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==2
eststo france:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==3 & period==1
eststo france2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==3 & period==2
eststo serbia:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==4 & period==1
eststo serbia2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==4 & period==2
eststo sweden:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==5 & period==1
eststo sweden2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==5 & period==2
eststo germany:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==6 
eststo hungary:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==7 & period==1
eststo hungary2:estpost sum gender dum_age1 dum_age2 dum_age3 dum_age4 dum_age5 educ_dummy1 educ_dummy2 educ_dummy3 ethnicity_dummy employment income_quartil health_1 ideology trust_1 efficacy_index if country==7 & period==2

esttab summstats summstats2 brazil brazil2  france france2 hungary hungary2 serbia serbia2 sweden sweden2 canada germany using TableA1.rtf, replace main(mean %6.2f) aux(sd)  nonumber nostar coeflabel(gender "% Women" dum_age1 "18-24" dum_age2 "25-34"  dum_age4 "45-54" dum_age5 "55+" educ_dummy1 "No/Primary/Lower Secondary" educ_dummy2 "Higher Secondary/Vocational" educ_dummy3 "University degree" ethnicity_dummy "% Minority" employment "% Unemployed" income_quartil "% Above Median Wage" health_1 "Subjective health" ideology "Ideology" trust_1 "Trust in Politicians" efficacy_index "Political Efficacy") mtitle ("Pooled data S1" "Pooled data S2" "Brazil S1" "Brazil S2"  "France S1" "France S2" "Hungary S1" "Hungary S2" "Serbia S1" "Serbia S2" "Sweden S1" "Sweden S2"   "Canada S2" "Germany S2")

* DATA FOR FOUR ADDITIONAL COUNTRIES *

*Call data from 4 additional countries (this data also includes burden tolerance indicies from the original 8 countries to be able to produce Figure 1)
use "4countries.dta", replace

*CFA (reported in Table B1)
sem (Tol_8 -> q19_1) (Tol_8 -> q19_2) (Tol_8 -> q19_4) (Tol_8 -> q19_6) if country==8, standardized 
predict tolerance_8, latent(Tol_8)
estat gof, stats(all)

sem (Tol_9 -> q19_1) (Tol_9 -> q19_2) (Tol_9 -> q19_4) (Tol_9 -> q19_6) if country==9, standardized 
predict tolerance_9, latent(Tol_9)
estat gof, stats(all)

sem (Tol_10 -> q19_1) (Tol_10 -> q19_2) (Tol_10 -> q19_4) (Tol_10 -> q19_6) if country==10, standardized 
predict tolerance_10, latent(Tol_10)
estat gof, stats(all)

sem (Tol_11 -> q19_1) (Tol_11 -> q19_2) (Tol_11 -> q19_4) (Tol_11 -> q19_6) if country==11, standardized 
predict tolerance_11, latent(Tol_11)
estat gof, stats(all)

*Reliability (reported in Table B1)
bysort country: alpha q19_1 q19_2 q19_4 q19_6

*Histograms (FIGURE 1)
hist tolerance_all, percent by(country) saving(hist, replace) xtitle("") ytitle("")
hist tolerance_all, saving(hist_1, replace) xtitle(Burden Tolerance) percent
graph combine  hist_1.gph hist.gph

* POLICY-SPECIFIC BURDEN TOLERANCE *

* Call policy-specific data
use "Policy_specific.dta", replace

*Recode variables, so higher values equals higher burden tolerance
recode q1_1- q1_4 (6=.) (1=5) (2=4) (4=2) (5=1)
recode q3a_1- q3a_4 (6=.) (1=5) (2=4) (4=2) (5=1)
recode q3b_1- q3b_4 (6=.) (1=5) (2=4) (4=2) (5=1)
recode q3c_1- q3c_4 (6=.) (1=5) (2=4) (4=2) (5=1)

*Labels
label define agree_new 1 "Strongly disagree" 2 "Disagree" 3 "Neither agree or disagree" 4 "Agree" 5 "Strongly Agree" 
label values  q1_1- q1_4 agree_new 

* Validity and reliability of indicies (reported in TABLE C1)

* GENERAL BURDEN TOLERANCE
sem (Tol_4 -> q1_1) (Tol_4 -> q1_2) (Tol_4 -> q1_3) (Tol_4 -> q1_4), standardized 
predict tolerance_1, latent(Tol_4)
estat gof, stats(all) 

alpha q1_1- q1_4, item casewise

* Creates index
gen index_gen=((q1_1+q1_2+q1_3+q1_4)-4)/16

* SNAP
sem (Tol_4 -> q3a_1) (Tol_4 -> q3a_2) (Tol_4 -> q3a_3) (Tol_4 -> q3a_4), standardized 
predict tolerance_2, latent(Tol_4)
estat gof, stats(all) 

alpha q3a_1- q3a_4, item casewise

* Creates index
gen index_snap=((q3a_1+q3a_2+q3a_3+q3a_4)-4)/16

* BUSINESS
sem (Tol_4 -> q3b_1) (Tol_4 -> q3b_2) (Tol_4 -> q3b_3) (Tol_4 -> q3b_4), standardized 
predict tolerance_3, latent(Tol_4)
estat gof, stats(all) 

alpha q3b_1- q3b_4, item casewise

* Creates index
gen index_bus=((q3b_1+q3b_2+q3b_3+q3b_4)-4)/16

* PASSPORT
sem (Tol_4 -> q3c_1) (Tol_4 -> q3c_2) (Tol_4 -> q3c_3) (Tol_4 -> q3c_4), standardized 
predict tolerance_4, latent(Tol_4)
estat gof, stats(all) 

alpha q3c_1- q3c_4, item casewise

* Creates index
gen index_pas=((q3c_1+q3c_2+q3c_3+q3c_4)-4)/16

* MEDICAID

*Recode variables, so higher values equals higher burden tolerance
recode q2a (1=1) (2=0), gen (tol1)
recode q2b (1=0) (2=1), gen (tol2)
recode q2c (1=1) (2=0), gen (tol3)
recode q2d (1=1) (2=0), gen (tol4)
recode q2e (1=1) (2=0), gen (tol5)
recode q2f (1=1) (2=0), gen (tol6)

*Reliability and validity
factor tol1-tol6, pf
alpha tol1-tol6, item casewise

* Creates index
gen index_medic=(tol1+tol2+tol3+tol4+tol5+tol6)/6

*Descriptive Statistics (Reported in TABLE C2)
eststo index: estpost sum index*
esttab index using TableC2.rtf, replace  main(mean %6.2f) aux(sd)  nonumber nostar

*Correlations between indicies (reported in TABLE 12)
pwcorr index* ideology, sig star (.05) obs
pwcorr index* ideology, sig star (.01) obs
pwcorr index* ideology, sig star (.10) obs

*Histograms (reported in Figure C1)
hist index_gen, saving(hist_1, replace) xtitle("General Burden Tolerance") ytitle("") percent 
hist index_snap, saving(hist_2, replace) xtitle("Burden Tolerance (SNAP)") ytitle("") percent 
hist index_bus, saving(hist_3, replace) xtitle("Burden Tolerance (Business)") ytitle("") percent 
hist index_pas, saving(hist_4, replace) xtitle("Burden Tolerance (Passport)") ytitle("") percent 
graph combine hist_1.gph hist_2.gph hist_3.gph hist_4.gph

*Regressions (reported in table C3)
eststo clear
eststo: reg index_gen i.gender c.age i.race i.educ i.empl_stat_2018 c.health i.income_hml_us c.ideology, robust
eststo: reg index_snap i.gender c.age i.race i.educ i.empl_stat_2018 c.health i.income_hml_us c.ideology, robust
eststo: reg index_bus i.gender c.age i.race i.educ i.empl_stat_2018 c.health i.income_hml_us c.ideology, robust
eststo: reg index_pas i.gender c.age i.race i.educ i.empl_stat_2018 c.health i.income_hml_us c.ideology, robust
esttab using tableC3.rtf, p(2) b(2) onecell label nobaselevels mtitle("General" "SNAP" "Business" "Passport") sfmt(0) 
eststo clear



